package com.example.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

/**
 * <p>
 * 标签表
 * </p>
 *
 * @author wuyunbin
 * @since 2024-10-18
 */
@Data
@TableName("tb_tag")
public class Tag implements Serializable {

    private static final long serialVersionUID = 1L;
    public Tag(){

    }

    public Tag(String name){
        this.name = name;
    }

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 标签名
     */
    private String name;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    @TableField("articles_total")
    private Integer articlesTotal;
}
